package com.hksj.Intelligentmanagement.controller;


import com.hksj.Intelligentmanagement.common.Rest;
import com.hksj.Intelligentmanagement.service.HandNumbnessStatisticalService;
import com.hksj.Intelligentmanagement.vo.AnesthesiaTypeDistributionVo;
import com.hksj.Intelligentmanagement.vo.DeptSurgicalNumVO;
import com.hksj.Intelligentmanagement.vo.HandNumbnessCountVo;
import com.hksj.Intelligentmanagement.vo.SurgicalStatusNumVO;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@Api(tags = "手麻统计分析")
@RequestMapping("/api/handNumbnessStatistical")
public class HandNumbnessStatisticalController {
    @Autowired
    private HandNumbnessStatisticalService handNumbnessStatisticalService;

    @ApiOperation(value = "手术状态统计")
    @PostMapping("/selectHandNumbnessCount")
    public Rest<HandNumbnessCountVo> selectHandNumbnessCount() {
        HandNumbnessCountVo res = handNumbnessStatisticalService.selectHandNumbnessCount();
        return Rest.ok(res);
    }


    @ApiOperation(value = "手术状态分布")
    @PostMapping("/selectHandNumbnessDistribution")
    public Rest<SurgicalStatusNumVO> selectHandNumbnessDistribution() {
        SurgicalStatusNumVO res = handNumbnessStatisticalService.selectHandNumbnessDistribution();
        return Rest.ok(res);
    }

    @ApiOperation(value = "麻醉类型分布")
    @PostMapping("/selectAnesthesiaTypeDistribution")
    public Rest<List<AnesthesiaTypeDistributionVo>> selectAnesthesiaTypeDistribution() {
        List<AnesthesiaTypeDistributionVo> list =handNumbnessStatisticalService.selectAnesthesiaTypeDistribution();
        return Rest.ok(list);
    }

    @ApiOperation(value = "按科室查询手术量分布")
    @PostMapping("/selectOperationByDepartment")
    public Rest<List<DeptSurgicalNumVO>> selectOperationByDepartment() {
        List<DeptSurgicalNumVO> list =handNumbnessStatisticalService.selectOperationByDepartment();
        return Rest.ok(list);
    }

}
